The generator matrix

 1  0  0  1  1  1  X  1  1  1  X  0  1  1  1  X  0  1  1  0  0
 0  1  0  0  1 X+1  1  0  X  1  1  1  1  X  X  0  1  X  0  1  0
 0  0  1  1  1  0  1  X  1 X+1  1  X  1  0  0  1  1  1  0  X  1
 0  0  0  X  0  0  0  0  0  X  X  0  X  X  X  0  X  0  X  X  0
 0  0  0  0  X  X  0  X  0  0  0  X  X  X  0  X  0  X  0  0  X

generates a code of length 21 over Z2[X]/(X^2) who�s minimum homogenous weight is 18.

Homogenous weight enumerator: w(x)=1x^0+76x^18+69x^20+54x^22+23x^24+24x^26+3x^28+6x^30

The gray image is a linear code over GF(2) with n=42, k=8 and d=18.
As d=18 is an upper bound for linear (42,8,2)-codes, this code is optimal over Z2[X]/(X^2) for dimension 8.
This code was found by Heurico 1.16 in 0.674 seconds.